﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var dateTime = DateTime.Now;
            Console.WriteLine(dateTime);
            Console.WriteLine("本月第{0}天",dateTime.Day);
            Console.WriteLine("公元{0}年",dateTime.Year);
            Console.WriteLine("本年第{0}年",dateTime.DayOfYear);
            Console.WriteLine("今天是{0}", dateTime.DayOfWeek);

            var str = "啊是的阿苏合法的还是";

            var str1 = str.IndexOf("是");
            Console.WriteLine(str1);
            Console.WriteLine(str.LastIndexOf('还'));

            var str2 = str.Replace('啊', '哦');
            Console.WriteLine(str2);

            var str3 = str.Substring(1);
            Console.WriteLine(str3);
            var str4 = str.Substring(5);
            Console.WriteLine(str4);
        }
    }
}
